<li class="dropdown user user-menu">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
        <img src="{{ request.user.staff_of.avatar.url }}"
             class="user-image" alt="User Image">
        <span class="hidden-xs">
            {{ request.user.staff_of.real_name|default:request.user.username }}
        </span>
    </a>
    <ul class="dropdown-menu">
        <!-- User image -->
        <li class="user-header">
            <img src="{{ request.user.staff_of.avatar.url }}"
                 class="img-circle" alt="User Image">
            <p>
                您好： {{ request.user.staff_of.real_name|default:request.user.username }}
                {% if request.user.staff_of.real_name %}
                    ({{ request.user.username }})
                {% endif %}
                <small>最近一次登录:{{ request.user.last_login }}</small>
            </p>
        </li>
        <!-- Menu Body -->
        {% comment %}<li class="user-body">
            <div class="col-xs-4 text-center">
                <a href="#">Followers</a>
            </div>
            <div class="col-xs-4 text-center">
                <a href="#">Sales</a>
            </div>
            <div class="col-xs-4 text-center">
                <a href="#">Friends</a>
            </div>
        </li>{% endcomment %}
        <!-- Menu Footer-->
        <li class="user-footer">
            <div class="pull-left">
                <a href="{% url 'change_password' %}"
                   class="btn btn-default btn-flat">
                    修改密码
                </a>
            </div>
            <div class="pull-right">
                <a href="{% url 'registration:logout' %}"
                   class="btn btn-default btn-flat">
                    退 出
                </a>
            </div>
        </li>
    </ul>
</li>